package com.example.sgxs_api.controller;
import com.example.sgxs_api.domain.ShoppingCar;
import com.example.sgxs_api.domain.ShoppingCarDetail;
import com.example.sgxs_api.mapper.ShoppingCarDetailMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin(origins = "*")
@Slf4j
@RequestMapping("shopping")
@RestController
public class ShoppingCarDetailController {
    @Autowired
    private ShoppingCarDetailMapper shoppingcar;

    @RequestMapping("look")
    private List<ShoppingCarDetail> getALL(){
        List<ShoppingCarDetail> list = shoppingcar.getAllShopping();
        return list;
    }
}
